package com.issac.messagequeue.mqserver.mapper;

import com.issac.messagequeue.mqserver.coreclass.Binding;
import com.issac.messagequeue.mqserver.coreclass.Exchange;
import com.issac.messagequeue.mqserver.coreclass.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MetaMapper {
    // 三个核心建表方法
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    // 插入&删除&查找
    void addExchange(Exchange exchange);
    void deleteExchange(String exchangeName);
    List<Exchange> searchAllExchanges();

    void addQueue(MSGQueue queue);
    void deleteQueue(String queueName);
    List<MSGQueue> searchAllQueues();

    void addBinding(Binding binging);
    void deleteBinding(Binding binding);
    List<Binding> searchAllBindings();
}
